
********************Appendix*********************************


******************************************
********Open 2017_CCES_data.dta********
******************************************

**set weights
svyset [pweight=weights_ucr]

***create coping condition variable among those in anger condition
tab ucr_article_treat
gen angcope=ucr_article_treat
recode angcope (1=.) (2=.) (3=0) (4=.) (5=1)
tab angcope
***0=Confront 1=Distancing

******Recode anger variables 0 - 1

***Anger at Time 1
tab ucr338
gen anger1=ucr338
recode anger1 (1=1) (2=.66) (3=.33) (4=0) 
tab anger1

***Anger at Time 2
tab ucr342
gen anger2=ucr342
recode anger2 (1=1) (2=.66) (3=.33) (4=0) 
tab anger2

***create difference in anger variable
gen diffanger=anger1-anger2


*****Recode Enthusiasm Variables 0-1

***Enthusiasm at Time 1
tab ucr340
gen enthu1=ucr340
recode enthu1 (1=1) (2=.66) (3=.33) (4=0) 
tab enthu1

***Enthusiasm at Time 2
tab ucr344
gen enthu2=ucr344
recode enthu2 (1=1) (2=.66) (3=.33) (4=0) 
tab enthu2


*****Recode Fear Variables 0-1

***Fear at Time 1
tab ucr339
gen fear1=ucr339
recode fear1 (1=1) (2=.66) (3=.33) (4=0) 
tab fear1

***Fear at Time 2
tab ucr343
gen fear2=ucr343
recode fear2 (1=1) (2=.66) (3=.33) (4=0) 
tab fear2


***Figure A1: Mean Enthusiasm at T1 and T2 in Study 1 (Anger Condition)******
reg enthu1 i.angcope [pweight=weights_ucr]
margins angcope, saving(t1_enthu_angcon_2017)

sleep 1000

reg enthu2 i.angcope [pweight=weights_ucr]
margins angcope, saving(t2_enthu_angcon_2017)

sleep 1000

#delimit ;
combomarginsplot t1_enthu_angcon_2017 t2_enthu_angcon_2017,
recast(scatter) byopt(r(1))  title("")
plot1opts(mcolor(black) msymbol(circle_hollow) msize(medlarge) lcolor(black) lpat(dash)) ci1opts(msymbol(oh) lcolor(black) lpat(dash))
plot2opts(mcolor(black) lcolor(black) msize(medlarge) lpat(solid)) ci2opts(lcolor(black) lpat(solid))
xlabel(0 `" "Problem-Focused" "(Confrontation -" "Act on Terrorism)" "' 1  `" "Emotion-Focused" "(Distancing - " "No Opportunity to Act)" "', labsize(3.5)) xtitle("") xscale(r (-.5 1.5))
ylabel( 0(.1).4, axis(1) nogrid labsize(2)) ytitle("Mean Enthusiasm") 
legend(order(3 "Enthusiasm at Time 1" 4 "Enthusiasm at Time 2"))
graphregion(color(white));

#delimit cr

graph export Figure_A1.png,  replace height(1000)


****Figure A2:  Mean Fear at T1 and T2 in Study 1 (Anger Condition)*****

reg fear1 i.angcope [pweight=weights_ucr]
margins angcope, saving(t1_fear_angcon_2017, replace)

sleep 1000

reg fear2 i.angcope [pweight=weights_ucr]
margins angcope, saving(t2_fear_angcon_2017, replace)

sleep 1000

#delimit ;
combomarginsplot t1_fear_angcon_2017 t2_fear_angcon_2017,
recast(scatter) byopt(r(1))  title("")
plot1opts(mcolor(black) msymbol(circle_hollow) msize(medlarge) lcolor(black) lpat(dash)) ci1opts(msymbol(oh) lcolor(black) lpat(dash))
plot2opts(mcolor(black) lcolor(black) msize(medlarge) lpat(solid)) ci2opts(lcolor(black) lpat(solid))
xlabel(0 `" "Problem-Focused" "(Confrontation -" "Act on Terrorism)" "' 1  `" "Emotion-Focused" "(Distancing - " "No Opportunity to Act)" "', labsize(3.5)) xtitle("") xscale(r (-.5 1.5))
ylabel( 0(.1).4, axis(1) nogrid labsize(2)) ytitle("Mean Fear") 
legend(order(3 "Fear at Time 1" 4 "Fear at Time 2"))
graphregion(color(white));

#delimit cr

graph export Figure_A2.png,  replace height(1000)

************Reappraisal Results*****************
***create coping condition variable among those in anger condition
tab ucr_article_treat
gen angcope2=ucr_article_treat
recode angcope2 (1=.) (2=.) (3=0) (4=1) (5=2)
tab angcope2
***0=Confront 1=Reappraisal 2=Distancing

svyset [pweight=weight]
svy: reg diffanger i.angcope
margins angcope


********Compliance Rates (Table A1 row 1)*************

***Confrontation Compliance Rate
gen participate=ucr341a
recode participate (1=1) (2=0)
tab ucr341a
tab participate if angcope==0

***Distancing Compliance Rate
gen participate2 = 1 if angcope==1
replace participate2=0 if angcope==1 & ucr341c_a==.
replace participate2=0 if angcope==1 & ucr341c_b==.
replace participate2=0 if angcope==1 & ucr341c_c==.
replace participate2=0 if angcope==1 & ucr341c_d==.
replace participate2=0 if angcope==1 & ucr341c_e==.
tab participate2 if angcope==1


*********Two-stage least squares analysis (Table A2 Column 1)********

***Create intrumental variable***
gen problemletter=angcope
recode problemletter (0=1) (1=0)
tab problemletter
tab angcope

***Create endogenous variable***
gen treatconfr = . 
replace treatconfr=1 if problemletter==1 & participate==1
replace treatconfr=0 if problemletter==1 & participate==0
replace treatconfr=0 if problemletter==0
tab treatconfr
tab problemletter

***Controls**
tab pid7
tab birthyr
tab gender
tab educ

tab cc17_350a 
gen ideo7=cc17_350a 
recode ideo7 (8=.) (98=.)
tab ideo7

tab race
gen white=race
recode white (1=1) (else=0)
tab white

****IV Regression (2 stage least squares - Table A2 Column 2)****
ivregress 2sls diffanger (treatconfr = problemletter gender educ white pid7 birthyr ideo7)


****Descriptive Statistics of Sample (Table A3 Column 1)********

gen age=2017-birthyr
tab age
svy: mean age

svy: tab gender

svy: tab white

svy: mean educ

tab pid7
gen dem=pid7
recode dem (1=1)(2=1)(3=1)(4=0)(5=0)(6=0)(7=0)(8=.)
gen rep=pid7 
recode rep (1=0)(2=0)(3=0)(4=0)(5=1)(6=1)(7=1)(8=.)
gen ind=pid7
recode ind (1=0)(2=0)(3=0)(4=1)(5=0)(6=0)(7=0)(8=.)

svy: tab dem
svy: tab rep
svy: tab ind

svy: mean ideo7



******************************************
********Open 2018_MTurk_data.dta********
******************************************

*********create variable for coping strategies among those in anger condition
gen angcope=condition
recode angcope (3=2) (2=1) (4=.) (1=0) (5=.) (6=.) (7=.)
tab angcope
****0=confront terrorism 1=act on transportation 2= no opportunity to act

******Recode anger variables 0 - 1

***Anger at T1
tab angert1
gen anger1=angert1
recode anger1 (1=1) (2=.66) (3=.33) (4=0) 
tab angert1
tab anger1

***Anger at T2
tab angert2
gen anger2=angert2
recode anger2 (1=1) (2=.66) (3=.33) (4=0) 
tab angert2
tab anger2

***create difference in anger variable
gen diffanger=anger1-anger2

*****Recode Enthusiasm Variables 0-1

***Enthusiasm at T1
tab enthut1
gen enthu1=enthut1
recode enthu1 (1=1) (2=.66) (3=.33) (4=0) 
tab enthut1
tab enthu1

***Enthusiasm at T2
tab enthut2
gen enthu2=enthut2
recode enthu2 (1=1) (2=.66) (3=.33) (4=0) 
tab enthut2
tab enthu2

******Recode fear variables 0 - 1

***Fear at T1
tab feart1
gen fear1=feart1
recode fear1 (1=1) (2=.66) (3=.33) (4=0) 
tab feart1
tab fear1

***Fear at T2
tab feart2
gen fear2=feart2
recode fear2 (1=1) (2=.66) (3=.33) (4=0) 
tab feart2
tab fear2


****Figure A3: Mean Enthusiasm at T1 and T2 in Study 2 (Anger Condition)*****

reg enthu1 i.angcope
margins angcope, saving(t1_enthu_angcon_2018, replace)

sleep 1000

reg enthu2 i.angcope
margins angcope, saving(t2_enthu_angcon_2018, replace)

sleep 1000

#delimit ;
combomarginsplot t1_enthu_angcon_2018 t2_enthu_angcon_2018,
recast(scatter) byopt(r(1))  title("")
plot1opts(mcolor(black) msymbol(circle_hollow) msize(medlarge) lcolor(black) lpat(dash)) ci1opts(msymbol(oh) lcolor(black) lpat(dash))
plot2opts(mcolor(black) lcolor(black) msize(medlarge) lpat(solid)) ci2opts(lcolor(black) lpat(solid))
xlabel(0 `" "Problem-Focused" "(Confrontation -" "Act on Terrorism)" "' 1`" "Emotion-Focused" "(Distancing - " "Act on Transportation)" "' 2 `" "Emotion-Focused" "(Distancing - " "No Opportunity to Act)" "' , labsize(3.5)) xtitle("") xscale(r (-.5 2.5))
ylabel( 0(.1).4, axis(1) nogrid labsize(2)) ytitle("Mean Enthusiasm") 
legend(order(3 "Enthusiasm at Time 1" 4 "Enthusiasm at Time 2"))
graphregion(color(white));

#delimit cr

graph export Figure_A3.png,  replace height(1000)


*****Figure A4: Mean Fear at T1 and T2 in Study 2 (Anger Condition)********
reg fear1 i.angcope
margins angcope, saving(t1_fear_angcon_2018, replace)

sleep 1000

reg fear2 i.angcope
margins angcope, saving(t2_fear_angcon_2018, replace)

sleep 1000

#delimit ;
combomarginsplot t1_fear_angcon_2018 t2_fear_angcon_2018,
recast(scatter) byopt(r(1))  title("")
plot1opts(mcolor(black) msymbol(circle_hollow) msize(medlarge) lcolor(black) lpat(dash)) ci1opts(msymbol(oh) lcolor(black) lpat(dash))
plot2opts(mcolor(black) lcolor(black) msize(medlarge) lpat(solid)) ci2opts(lcolor(black) lpat(solid))
xlabel(0 `" "Problem-Focused" "(Confrontation -" "Act on Terrorism)" "' 1`" "Emotion-Focused" "(Distancing - " "Act on Transportation)" "' 2 `" "Emotion-Focused" "(Distancing - " "No Opportunity to Act)" "' , labsize(3.5)) xtitle("") xscale(r (-.5 2.5))
ylabel( 0(.1).4, axis(1) nogrid labsize(2)) ytitle("Mean Fear") 
legend(order(3 "Fear at Time 1" 4 "Fear at Time 2"))
graphregion(color(white));

#delimit cr

graph export Figure_A4.png,  replace height(1000)



*********Reappraisal Results*****************

*********create variable for coping strategies among those in anger condition
gen angcope2=condition
recode angcope2 (3=2) (2=1) (4=3) (1=0) (5=.) (6=.) (7=.)
tab angcope2
****0=confront terrorism 1=act on transportation 2= no opportunity to act 3=reappraise

reg diffanger i.angcope2
margins angcope2
margins r.angcope2
margins rb1.angcope2
margins rb2.angcope2


********Compliance Rates (Table A1 row 2)*************

***Confrontation Letter Compliance
gen participate=confrletter
recode participate (1=1) (2=0)
tab confrletter
tab participate if angcope==0

***Infastructure Letter Compliance
gen participate2=infasletter
recode participate2 (1=1) (2=0)
tab infasletter
tab participate2
tab participate2 if angcope==1

**Distancing Compliance
gen participate3 = 1 if angcope==2
replace participate3=0 if angcope==2 & distract_1==.
replace participate3=0 if angcope==2 & distract_2==.
replace participate3=0 if angcope==2 & distract_3==.
replace participate3=0 if angcope==2 & distract_4==.
replace participate3=0 if angcope==2 & distract_5==.
tab participate3


*********Two-stage least squares analysis (Table A2 Column 2)********

***Create instrumental variables***

gen problemletter=angcope
recode problemletter (0=1) (1=0) (2=0)
tab problemletter
tab angcope

gen emotionletter=angcope
recode emotionletter (1=1) (0=0) (2=0)
tab emotionletter
tab angcope

***Create endogenous variables***

gen treatconfr = . 
replace treatconfr=1 if problemletter==1 & confrletter==1
replace treatconfr=0 if problemletter==1 & confrletter==2
replace treatconfr=0 if problemletter==0
tab treatconfr
tab problemletter
tab confrletter if angcope==0


gen treatdist = . 
replace treatdist=1 if emotionletter==1 & infasletter==1
replace treatdist=0 if emotionletter==1 & infasletter==2
replace treatdist=0 if emotionletter==0
tab treatdist
tab emotionletter
tab infasletter if angcope==1

****Controls****

gen pid7=.
replace pid7=1 if piddem==1
replace pid7=2 if piddem==2
replace pid7=3 if pidind==2
replace pid7=4 if pidind==3
replace pid7=5 if pidind==1
replace pid7=6 if pidrep==2
replace pid7=7 if pidrep==1
tab pid7

tab age

tab gender
tab educ
tab ideo

tab race
gen white=race
recode white (1=1) (.=.) (else=0)
tab white

****IV Regression (2 stage least squares - Table A2 Column 2)**********
ivregress 2sls diffanger (treatconfr treatdist = problemletter emotionletter pid7 age gender ideo educ white)
test treatconfr=treatdist



****Descriptive Statistics of Sample (Table A3 Column 2)********

sum age
tab gender
tab race
sum educ

tab pid7
gen dem=pid7
recode dem (1=1)(2=1)(3=1)(4=0)(5=0)(6=0)(7=0)(8=.)
tab dem 

gen rep=pid7 
recode rep (1=0)(2=0)(3=0)(4=0)(5=1)(6=1)(7=1)(8=.)
tab rep

gen ind=pid7
recode ind (1=0)(2=0)(3=0)(4=1)(5=0)(6=0)(7=0)(8=.)
tab ind

sum ideo


******************************************
********Open 2020_MTurk_data.dta********
******************************************


***create variable for anger vs. control article condition
tab condition
gen angrcon=condition
recode angrcon (1=1) (2=0)
tab angrcon condition


*********create variable for coping strategies among those in anger condition
tab acon
gen angcope=.
replace angcope=0 if angrcon==1 & acon==1
replace angcope=1 if angrcon==1 & acon==2
replace angcope=2 if angrcon==1 & acon==3
tab angcope
****0=confront terrorism 1=act on transportation 2=control

******Recode anger variables 0 - 1

***Anger at T1
tab anger1
gen angert1=anger1
recode angert1 (1=1) (2=.66) (3=.33) (4=0) 
tab angert1
tab anger1


***Anger at T2
tab anger2
gen angert2=anger2
recode angert2 (1=1) (2=.66) (3=.33) (4=0) 
tab angert2
tab anger2

**Create change in anger variable***
gen diffanger=angert1-angert2

******Recode fear variables 0 - 1

***Fear at T1
tab afraid1
gen feart1=afraid1
recode feart1 (1=1) (2=.66) (3=.33) (4=0) 
tab feart1
tab afraid1

***Fear at T2
tab afraid2
gen feart2=afraid2
recode feart2 (1=1) (2=.66) (3=.33) (4=0) 
tab afraid2
tab feart2

*****Recode Enthusiasm Variables 0-1

***Enthusiasm at T1
tab enthus1
gen enthust1=enthus1
recode enthust1 (1=1) (2=.66) (3=.33) (4=0) 
tab enthus1
tab enthust1

***Enthusiasm at T2
tab enthus2
gen enthust2=enthus2
recode enthust2 (1=1) (2=.66) (3=.33) (4=0) 
tab enthust2
tab enthus2


****Figure A5: Mean Enthusiasm at T1 and T2 in Study 3 (Anger Condition)****
reg enthust1 i.angcope
margins angcope, saving(t1_enthu_angcon_2020, replace)

sleep 1000

reg enthust2 i.angcope
margins angcope, saving(t2_enthu_angcon_2020, replace)

sleep 1000

#delimit ;
combomarginsplot t1_enthu_angcon_2020 t2_enthu_angcon_2020,
recast(scatter) byopt(r(1))  title("")
plot1opts(mcolor(black) msymbol(circle_hollow) msize(medlarge) lcolor(black) lpat(dash)) ci1opts(msymbol(oh) lcolor(black) lpat(dash))
plot2opts(mcolor(black) lcolor(black) msize(medlarge) lpat(solid)) ci2opts(lcolor(black) lpat(solid))
xlabel(0 `" "Problem-Focused" "(Confrontation -" "Act on Terrorism)" "' 1`" "Emotion-Focused" "(Distancing - " "Act on Transportation)" "' 2 `" "Control" "(No Coping Strategy)" "' , labsize(3.5)) xtitle("") xscale(r (-.5 2.5))
ylabel( 0(.1).4, axis(1) nogrid labsize(2)) ytitle("Mean Enthusiasm") 
legend(order(3 "Enthusiasm at Time 1" 4 "Enthusiasm at Time 2"))
graphregion(color(white));

#delimit cr

graph export Figure_A5.png,  replace height(1000)


*****Figure A6: Mean Fear at T1 and T2 in Study 3 (Anger Condition)*********
reg feart1 i.angcope
margins angcope, saving(t1_fear_angcon_2020, replace)

sleep 1000

reg feart2 i.angcope
margins angcope, saving(t2_fear_angcon_2020, replace)

sleep 1000

#delimit ;
combomarginsplot t1_fear_angcon_2020 t2_fear_angcon_2020,
recast(scatter) byopt(r(1))  title("")
plot1opts(mcolor(black) msymbol(circle_hollow) msize(medlarge) lcolor(black) lpat(dash)) ci1opts(msymbol(oh) lcolor(black) lpat(dash))
plot2opts(mcolor(black) lcolor(black) msize(medlarge) lpat(solid)) ci2opts(lcolor(black) lpat(solid))
xlabel(0 `" "Problem-Focused" "(Confrontation -" "Act on Terrorism)" "' 1`" "Emotion-Focused" "(Distancing - " "Act on Transportation)" "' 2 `" "Control" "(No Coping Strategy)" "' , labsize(3.5)) xtitle("") xscale(r (-.5 2.5))
ylabel( 0(.1).4, axis(1) nogrid labsize(2)) ytitle("Mean Fear") 
legend(order(3 "Fear at Time 1" 4 "Fear at Time 2"))
graphregion(color(white));

#delimit cr

graph export Figure_A6.png,  replace height(1000)


********Compliance Rates (Table A1 row 3)*************

***Confrontation Compliance Rate
gen participate=confrletter
recode participate (1=1) (2=0)
tab confrletter
tab participate if angcope==0

***Infastructure Compliance Rate
gen participate2=infasletter
recode participate2 (1=1) (2=0)
tab infasletter
tab participate2 if angcope==1

***Control Compliance rate
gen participate3 = 1 if angcope==2
replace participate3=0 if angcope==2 & casualt==.
replace participate3=0 if angcope==2 & city==.
replace participate3=0 if angcope==2 & terr_group==.
tab participate3 if angcope==2

*********Two-stage least squares analysis (Table A2 Column 3)********

***Create intrumental variables*** 
gen problemfocus=angcope
recode problemfocus (0=1) (1=0) (2=0)
tab problemfocus
tab angcope

gen emotionfocus=angcope
recode emotionfocus (1=1) (0=0) (2=0)
tab emotionfocus
tab angcope

***Create endogenous variables***
gen treatconfr = . 
replace treatconfr=1 if problemfocus==1 & confrletter==1
replace treatconfr=0 if problemfocus==1 & confrletter==2
replace treatconfr=0 if problemfocus==0
tab treatconfr
tab problemfocus
tab confrletter if angcope==0

gen treatdist = . 
replace treatdist=1 if emotionfocus==1 & infasletter==1
replace treatdist=0 if emotionfocus==1 & infasletter==2
replace treatdist=0 if emotionfocus==0
tab treatdist
tab emotionfocus
tab infasletter if angcope==1


***Controls**
gen pid7=.
replace pid7=1 if strongdem==1
replace pid7=2 if strongdem==2
replace pid7=3 if ptyclose==2
replace pid7=4 if ptyclose==3
replace pid7=5 if ptyclose==1
replace pid7=6 if strongrep==2
replace pid7=7 if strongrep==1
tab pid7
tab pid

tab age
replace age=28 if age==1989
tab age

tab gender
tab educ
tab ideo

tab race
gen white=race
recode white (1=1) (.=.) (else=0)
tab white

****IV Regression (2 stage least squares - Table A2 Column 3)**********
ivregress 2sls diffanger (treatconfr treatdist = problemfocus emotionfocus pid7 age gender ideo educ white)
test treatconfr=treatdist

***********Figure A7:  Effect of the Coping Conditions on Positions on the use of Military Force among Liberals and Conservatives


***Create Extremity Scale*****
gen diplomacy1=.
replace diplomacy1=0 if diplomacy==4
replace diplomacy1=.33 if diplomacy==3
replace diplomacy1=.66 if diplomacy==2
replace diplomacy1=1 if diplomacy==1
replace diplomacy1=.33 if diplomacy==5
replace diplomacy1=.66 if diplomacy==6
replace diplomacy1=1 if diplomacy==7

***Create Full Diplomacy Scale****
tab diplomacy
gen diplomacy2=diplomacy
recode diplomacy2 (1=0) (2=.167) (3=.334) (4=.501) (5=.668) (6=.835) (7=1)
tab diplomacy
tab diplomacy2

***Create Condition variable***
gen cntrcfrtdis=.
replace cntrcfrtdis=0 if acon==4
replace cntrcfrtdis=1 if angcope==0
replace cntrcfrtdis=2 if angcope==1
tab cntrcfrtdis
****0=control/control 1=anger/problem-focused 2=anger/emotion-focused

***Create Ideology Dummy Variable**
tab ideo
gen ideo2=ideo
recode ideo2 (1=0) (2=0) (3=0) (4=.) (5=1) (6=1) (7=1)
tab ideo2

***Top left panel of Figure A7
reg diplomacy1 i.cntrcfrtdis##i.ideo2
margins cntrcfrtdis, by(ideo2) 
mplotoffset, xlabel(0 `" "Control/" "Control" "'  1 `" "Anger/" "Problem-Focused" "' 2 `" "Anger/" "Emotion-Focused" "' ) recast(scatter) graphregion(color(white))  xtitle("") title("Predicted Values") ytitle("Extremity of Position on Military Force")  xscale(r(-.4 2.4)) name(extremity1, replace) legend(order(3 "Liberal" 4 "Conservative") )

***Top right panel of Figure A7
margins r.cntrcfrtdis, by(ideo2) 
mplotoffset, yline(0) xlab(1 `" "Anger/Problem-Focused" "vs." "Control/Control" "' 2  `" "Anger/Emotion-Focused" "vs." "Control/Control" "') recast(scatter) graphregion(color(white))  xtitle("") title("Marginal Effects") ytitle("Difference in Extremity of Positions on Military Force") xscale(r(.6 2.4)) yscale(r(-.1 .2)) name(extremity1, replace) legend(order(3 "Liberal" 4 "Conservative") ) 

***Bottom left panel of Figure A7
reg diplomacy2 i.cntrcfrtdis##i.ideo2
margins cntrcfrtdis, by(ideo2) level(95)
marginsplot, xlabel(0 `" "Control/" "Control" "'  1 `" "Anger/" "Problem-Focused" "' 2 `" "Anger/" "Emotion-Focused" "' ) recast(scatter) graphregion(color(white))  xtitle("") title("Predicted Values") ytitle("Position on Military Force") xscale(r(-.4 2.4)) name(extremity1, replace) legend(order(3 "Liberal" 4 "Conservative") )

***Bottom right panel of Figure A7
margins r.cntrcfrtdis, by(ideo2)
mplotoffset, yline(0) xlab(1 `" "Anger/Problem-Focused" "vs." "Control/Control" "' 2  `" "Anger/Emotion-Focused" "vs." "Control/Control" "') recast(scatter) graphregion(color(white))  xtitle("") title("Marginal Effects") ytitle("Difference in Positions on Military Force") xscale(r(.6 2.4)) yscale(r(-.1 .2)) name(extremity1, replace) legend(order(3 "Liberal" 4 "Conservative") ) 


************Figure A8: Effect of Coping Strategies on Reduction in Anger across Perceptions of Terrorism Solvability

**Create dummy variable for percpetions that the US can solve terrorism
tab solvterr1
gen solvterr12=solvterr1
recode solvterr12 (1=1) (2=1) (3=1) (4=0) (5=0)
tab solvterr12

***Top panel of Figure A8
reg diffanger i.angcope##i.solvterr12
margins rb2.angcope, at(solvterr12=(0 1))
marginsplot, gr(angcope, lab("Problem-Focused v. Control" "Emotion-Focused v. Control")) x(solvterr12) yline(0)  xtitle("Perceptions that the US can Solve Terrorism") ytitle ("Difference in Reduction of Anger") graphregion(color(white)) xscale(r(-.2 1.2)) ylabel(-.1(.05).3)

***Bottom panel of Figure A8
gen confrdis=angcope
recode confrdis (2=.)
tab confrdis
reg diffanger i.confrdis##i.solvterr12
margins r.confrdis, at(solvterr12=(0 1))
marginsplot, x(solvterr12) yline(0) title("Emotion-Focused vs. Problem-Focused") xtitle("Perceptions that the US can Solve Terrorism") ytitle ("Difference in Reduction of Anger") graphregion(color(white)) xscale(r(-.2 1.2)) ylabel(-.1(.05).3)


****Descriptive Statistics of Sample (Table A3 Column 3)********

sum age
tab gender
tab race
sum educ

tab pid7
gen dem=pid7
recode dem (1=1)(2=1)(3=1)(4=0)(5=0)(6=0)(7=0)(8=.)
tab dem 

gen rep=pid7 
recode rep (1=0)(2=0)(3=0)(4=0)(5=1)(6=1)(7=1)(8=.)
tab rep

gen ind=pid7
recode ind (1=0)(2=0)(3=0)(4=1)(5=0)(6=0)(7=0)(8=.)
tab ind

sum ideo

